﻿using AssetManageSystem.Model.OrgManage;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Attributes;

namespace AssetManageSystem.Model.AssetManage
{
    /// <summary>
    /// 资产领用
    /// </summary>
    public class AssetConsuming : PersistPoco
    {
        [Display(Name = "单据编号")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public string DocNumber { get; set; }

        [Display(Name = "领用人")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? AsUserId { get; set; }
        public User AsUser { get; set; }

        [Display(Name = "领用部门")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public Guid? UnitId { get; set; }
        public Department Unit { get; set; }

        [Display(Name = "领用日期")]
        [Required(ErrorMessage = "Validate.{0}required")]
        public DateTime? OutDate { get; set; }

        public List<AssetInfo> AssetInfos { get; set; }

        public List<AssetConsumMiddleTable> AssetId { get; set; }
    }

}
